<?php require_once(dirname(__FILE__)."/../config/config.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>礼品修改页面</title>
</head>
<body>
<?php  
if($_SESSION['admin_name']=="")
{

	echo "<script>location.href='admin_login.php';</script>";
}
?>
<?php
  $gift_id=$_GET[gift_id];
  $page=$_REQUEST['page'];
  $sql = "select * from zy_gift where gift_id = '".$gift_id."'";
 // echo $sql;
  $result = mysql_query($sql);
  $zy_gift = mysql_fetch_array($result);
  
 // print_r($info);
?>
<form action="gift_action.php?action=update&gift_id=<?php echo $zy_gift['gift_id'];?>&page=<?php echo $page ?> "  enctype="multipart/form-data"  method="post" onsubmit="javascript:return check();">
	   	<table width="320" border="0" align="center">
			<tr>
			<td align="right"> 礼品名字: </td>
			<td><input type="text" name="gift_name" value="<?php echo $zy_gift['gift_name'];?>"/></td>
			</tr>
			<tr>
			<td align="right"> 礼品兑换积分: </td>
			<td><input type="text" name="integral" value="<?php echo $zy_gift['integral'];?>"/></td>
			</tr>
			<tr>
			<td align="right"> 礼品小图路径: </td>
			<td>
			<input type="hidden" name="xiaotu" value="<?php echo $zy_gift['image'];?>" />
			<input name="image" type="file" id="image"  /></td>
			</tr>
			<tr>
			<td align="right"> 礼品大图路径: </td>
			
			<td>
				<input type="hidden" name="xiaotu2" value="<?php echo $zy_gift['image2'];?>" />
			<input name="image2" type="file" id="image2" value="<?php echo $zy_gift['image2']?>" /></td>
			</tr>
			<tr>
			<td align="right"> 礼品描述: </td>
			<td><textarea rows="10" cols="20" name="description"><?php echo $zy_gift['description'] ?></textarea></td>
			</tr>
			<tr>
				<td colspan="2" align="center">
						<input type="submit" value="填写"/>&nbsp;&nbsp;
				</td>		
			</tr>
		</table>
		</form>
		</body>
		</html>
<script type="text/javascript">
function check(){

return true;
}

</script>
